<?php

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/


Route::namespace('user')->group(function (){
    Route::prefix('user')->middleware('UserMiddleware')->group(function (){


        Route::get('get_user_info','UsersController@getUserInfo');
        Route::get('get_spread','UsersController@get_spread');
        Route::get('all_stock','UsersController@all_stock');
        Route::get('get_user_stock','UsersController@get_user_stock');
        Route::get('get_bills','UsersController@get_bills');
        Route::post('set_address_json_data','UsersController@set_address_json_data');
        Route::post('update_nickname_headimgurl','UsersController@update_nickname_headimgurl');
        Route::post('widthwal','UsersController@widthwal');
        Route::post('set_card_json','UsersController@set_card_json');
        Route::get('get_category_info','ProjectsController@get_category_info');
        Route::get('get_goods_info','ProjectsController@get_project_info');
        Route::post('add_car','CarsController@addCar');
        Route::post('inc_dec_car','CarsController@inc_dec_car');
        Route::post('del_car','CarsController@del_car');
        Route::post('del_cars','CarsController@del_cars');
        Route::post('add_order','OrdersController@addOrder');
        Route::post('car_add_order','OrdersController@car_add_order');
        Route::get('get_now_seven','OrdersController@get_now_seven');
        Route::post('hexiao','OrdersController@hexiao');
        Route::post('confirm_order','OrdersController@confirm_order');
        Route::get('get_user_orders','OrdersController@get_orders');
        Route::get('get_he_orders','OrdersController@get_he_orders');
        Route::get('get_user_order_info','OrdersController@get_user_order_info');
        Route::get('areas','OrdersController@areas');
        Route::get('get_area_shop','OrdersController@get_area_shop');
        Route::get('get_cars','CarsController@get_cars');
        Route::get('qr_code','ImagesController@qr_code');
        Route::post('vip_pay','VipController@vip_pay');
    });


    Route::prefix('user')->group(function (){
        Route::get('get_goods','ProjectsController@get_goods');
        Route::any('file_up','UsersController@file_up');
        Route::post('login','UsersController@login');
        Route::get('return_vip_money','UsersController@return_vip_money');
        Route::any('notice','NoticeController@notice')->name('notice');
        Route::any('notice_goods','NoticeController@notice_goods')->name('notice_goods');
        Route::get('get_order_child_info_be_hexiao','UsersController@get_order_child_info_be_hexiao');
        Route::get('get_category_goods','ProjectsController@get_category_goods');
        Route::get('get_images','ImagesController@get_images');
        Route::any('test','ImagesController@test');
        Route::any('get_now_money_lists','UsersController@get_now_money_lists');

    });

});


